count how many times a value is repeated